<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <title>投票总览</title>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <style type="text/css">
        .layui-table-cell {
            height: 100%;
            max-width: 100%;
        }
    </style>
</head>
<body>

<table id="recordTable" lay-filter="userTable"></table>



<script type="text/javascript" src="layui/layui.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">

    layui.use(['table','form','layer'],function () {

        var table = layui.table;
        var form = layui.form;
        var layer = layui.layer;
        table.render({
            elem:'#recordTable'
            ,url:'admin-record/list'
            ,page:true
            ,limit:10
            ,limits:[10,20,30,40]
            ,cols:[[
                {field:'id',title:'编号',sort:true, width:80, align:'center'}
                ,{field:'username', title:'账号', align:'center'}
                ,{field:'name', title:'用户名', align:'center'}
                ,{field:'type', title:'用户类型', align:'center', width:100}
                ,{field:'projectName',title:'活动名称', align:'center'}
                ,{field:'projectImg',title:'活动图片',align:'center',templet:function (d) {
                        return "<img src='"+d.projectImg+"' height='50px'/>";
                    }, width:120}
                ,{field:'projectPublic',title:'投票权限', align:'center', width:100}
                ,{field:'projectChoice',title:'投票类型', align:'center', width:100}
                ,{field:'optionName',title:'选项名称', align:'center'}
                ,{field:'optionImg',title:'选项图片',align:'center',templet:function (d) {
                        return "<img src='"+d.optionImg+"' height='50px'/>";
                    }, width:120}
                ,{field:'recordTime',title:'投票时间', align:'center'}
            ]]
        });

    });


</script>


</body>
</html>